<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Other Protocols  Reference</title>
    <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="css/highlight.css" />
    <meta charset="utf-8">
    <script src="js/jquery.min.js" defer></script>
    <script src="js/jazzy.js" defer></script>
    
    <script src="js/lunr.min.js" defer></script>
    <script src="js/typeahead.jquery.js" defer></script>
    <script src="js/jazzy.search.js" defer></script>
  </head>
  <body>


    <a title="Other Protocols  Reference"></a>

    <header class="header">
      <p class="header-col header-col--primary">
        <a class="header-link" href="index.html">
          SwiftSVG Docs
        </a>
         (51% documented)
      </p>
    
      <p class="header-col--secondary">
        <form role="search" action="search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>
      </p>
    
        <p class="header-col header-col--secondary">
          <a class="header-link" href="https://github.com/mchoe/swiftsvg">
            <img class="header-icon" src="img/gh.png"/>
            View on GitHub
          </a>
        </p>
    
    </header>

    <p class="breadcrumbs">
      <a class="breadcrumb" href="index.html">SwiftSVG Reference</a>
      <img class="carat" src="img/carat.png" />
      Other Protocols  Reference
    </p>

    <div class="content-wrapper">
      <nav class="navigation">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="SVG Extensions.html">SVG Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/CAShapeLayer.html">CAShapeLayer</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Other Classes.html">Other Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/NSXMLSVGParser.html">NSXMLSVGParser</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/SVGCache.html">SVGCache</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/SVGCircle.html">SVGCircle</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/SVGEllipse.html">SVGEllipse</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/SVGGroup.html">SVGGroup</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/SVGLayer.html">SVGLayer</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/SVGLine.html">SVGLine</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/SVGRectangle.html">SVGRectangle</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other Classes.html#/s:C8SwiftSVG7SVGView">SVGView</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Other Enums.html">Other Enums</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other Enums.html#/s:O8SwiftSVG7LineCap">LineCap</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other Enums.html#/s:O8SwiftSVG8LineJoin">LineJoin</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Other Extensions.html">Other Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/CALayer.html">CALayer</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/Dictionary.html">Dictionary</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/DispatchQueue.html">DispatchQueue</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UIBezierPath.html">UIBezierPath</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UIView.html">UIView</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Other Protocols.html">Other Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/Fillable.html">Fillable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/SVGContainerElement.html">SVGContainerElement</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/SVGElement.html">SVGElement</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/SVGParser.html">SVGParser</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/SVGShapeElement.html">SVGShapeElement</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/Strokable.html">Strokable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other Protocols.html#/s:P8SwiftSVG8Stylable">Stylable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other Protocols.html#/s:P8SwiftSVG13Transformable">Transformable</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Other Structs.html">Other Structs</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Other Structs.html#/s:V8SwiftSVG26SVGParserSupportedElements">SVGParserSupportedElements</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/SVGPath.html">SVGPath</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/SVGPolygon.html">SVGPolygon</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/SVGPolyline.html">SVGPolyline</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/SVGRootElement.html">SVGRootElement</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">

        <section class="section">
          <div class="section-content">
            <h1>Other Protocols</h1>
            <p>The following protocols are available globally.</p>

          </div>
        </section>

        <section class="section">
          <div class="section-content">
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:P8SwiftSVG9Strokable"></a>
                    <a name="//apple_ref/swift/Protocol/Strokable" class="dashAnchor"></a>
                    <a class="token" href="#/s:P8SwiftSVG9Strokable">Strokable</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A protocol that described an instance that can be stroked. Two default implementations are provided for this protocol:</p>

<ol>
<li><code><a href="Protocols/SVGShapeElement.html">SVGShapeElement</a></code> - Will set the underlying <code><a href="Classes/SVGLayer.html">SVGLayer</a></code>&lsquo;s stroke color, width, line cap, line join, and miter limit. Note that <code>SVGLayer is a subclass of</code>CAShapeLayer<code>, so this default implementation wil;l set the</code>CAShapeLayer<code>&#39;s line properties and not the</code>CALayer`&rsquo;s border attributes.</li>
<li><code><a href="Classes/SVGGroup.html">SVGGroup</a></code> - The default implementation just saves the attributes and values to be applied after all the subelements have been processed.</li>
</ol>

                        <a href="Protocols/Strokable.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">Strokable</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:P8SwiftSVG13Transformable"></a>
                    <a name="//apple_ref/swift/Protocol/Transformable" class="dashAnchor"></a>
                    <a class="token" href="#/s:P8SwiftSVG13Transformable">Transformable</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A protocol that describes an instance that can be transformed via an SVG element&rsquo;s <code>transform</code> attribute. Currently, <code>matrix</code>, <code>rotate</code>, <code>scale</code>, <code>skewX</code>, and <code>skewY</code> are supported. A default implementation is supplied for <code><a href="Protocols/SVGContainerElement.html">SVGContainerElement</a></code>s that sets the <code>affineTransform</code> of the container layer itself, not on all of its subelements.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">Transformable</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:P8SwiftSVG8Stylable"></a>
                    <a name="//apple_ref/swift/Protocol/Stylable" class="dashAnchor"></a>
                    <a class="token" href="#/s:P8SwiftSVG8Stylable">Stylable</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A protocol that describes instances whose attributes that can be set vis a css style string. A default implementation is supplied that parses the style string and applies the attributes using the <code>SVGelement</code>&lsquo;s <code>supportedAttributes</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">Stylable</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:P8SwiftSVG10SVGElement"></a>
                    <a name="//apple_ref/swift/Protocol/SVGElement" class="dashAnchor"></a>
                    <a class="token" href="#/s:P8SwiftSVG10SVGElement">SVGElement</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A protocol describing an instance that can parse a single SVG element such as
<code>&lt;path&gt;, &lt;svg&gt;, &lt;rect&gt;</code>.</p>

                        <a href="Protocols/SVGElement.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SVGElement</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:P8SwiftSVG19SVGContainerElement"></a>
                    <a name="//apple_ref/swift/Protocol/SVGContainerElement" class="dashAnchor"></a>
                    <a class="token" href="#/s:P8SwiftSVG19SVGContainerElement">SVGContainerElement</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A protocol that describes an instance that can store SVG sublayers and can apply a single attributes to all sublayers.</p>

                        <a href="Protocols/SVGContainerElement.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SVGContainerElement</span><span class="p">:</span> <span class="kt"><a href="Protocols/SVGElement.html">SVGElement</a></span><span class="p">,</span> <span class="kt"><a href="Protocols/Fillable.html">Fillable</a></span><span class="p">,</span> <span class="kt"><a href="Protocols/Strokable.html">Strokable</a></span><span class="p">,</span> <span class="kt"><a href="Other Protocols.html#/s:P8SwiftSVG13Transformable">Transformable</a></span><span class="p">,</span> <span class="kt"><a href="Other Protocols.html#/s:P8SwiftSVG8Stylable">Stylable</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:P8SwiftSVG8Fillable"></a>
                    <a name="//apple_ref/swift/Protocol/Fillable" class="dashAnchor"></a>
                    <a class="token" href="#/s:P8SwiftSVG8Fillable">Fillable</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A protocol that described an instance that can be filled. Two default implementations are provided for this protocol: </p>

<ol>
<li><code><a href="Protocols/SVGShapeElement.html">SVGShapeElement</a></code> - Will set the fill color, fill opacity, and fill rule on the underlying <code><a href="Classes/SVGLayer.html">SVGLayer</a></code> which is a subclass of <code>CAShapeLayer</code></li>
<li><code><a href="Classes/SVGGroup.html">SVGGroup</a></code> - Will set the fill color, fill opacity, and fill rule of all of a <code><a href="Classes/SVGGroup.html">SVGGroup</a></code>&lsquo;s subelements</li>
</ol>

                        <a href="Protocols/Fillable.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">Fillable</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:P8SwiftSVG9SVGParser"></a>
                    <a name="//apple_ref/swift/Protocol/SVGParser" class="dashAnchor"></a>
                    <a class="token" href="#/s:P8SwiftSVG9SVGParser">SVGParser</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A protocol describing an XML parser capable of parsing SVG data</p>

                        <a href="Protocols/SVGParser.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SVGParser</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:P8SwiftSVG15SVGShapeElement"></a>
                    <a name="//apple_ref/swift/Protocol/SVGShapeElement" class="dashAnchor"></a>
                    <a class="token" href="#/s:P8SwiftSVG15SVGShapeElement">SVGShapeElement</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A protocol that describes an instance that stores the path as a <code>CAShapeLayer</code></p>

                        <a href="Protocols/SVGShapeElement.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SVGShapeElement</span><span class="p">:</span> <span class="kt"><a href="Protocols/SVGElement.html">SVGElement</a></span><span class="p">,</span> <span class="kt"><a href="Protocols/Fillable.html">Fillable</a></span><span class="p">,</span> <span class="kt"><a href="Protocols/Strokable.html">Strokable</a></span><span class="p">,</span> <span class="kt"><a href="Other Protocols.html#/s:P8SwiftSVG13Transformable">Transformable</a></span><span class="p">,</span> <span class="kt"><a href="Other Protocols.html#/s:P8SwiftSVG8Stylable">Stylable</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </section>

      </article>
    </div>
    <section class="footer">
      <p>© 2017 Michael Choe under <a class="link" href="https://github.com/mchoe/SwiftSVG/blob/master/LICENSE" target="_blank" rel="external">MIT</a>.</p>
      <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
    </section>
  </body>
</div>
</html>
